package com.service.imp;

import com.dao.UpdateDao;
import com.pojo.Goods;
import com.pojo.Member;
import com.pojo.Provider;
import com.pojo.User;
import com.service.UpdateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UpdateServiceImp implements UpdateService {
    @Autowired
    private UpdateDao updateDao;
    public User getUserById(int id) {
        return updateDao.getUserById(id);
    }
    public int updateUser(User user) {
        return updateDao.updateUser(user);
    }

    public Provider getProviderById(int id) {
        return updateDao.getProviderById(id);
    }

    public int updateProvider(Provider provider) {
        return updateDao.updateProvider(provider);
    }

    public Goods getGoodsById(int id) {
        return updateDao.getGoodsById(id);
    }

    public List<Provider> getProviderToUpdateGoods() {
        return updateDao.getProviderToUpdateGoods();
    }

    public int updateGoods(Goods goods) {
        return updateDao.updateGoods(goods);
    }

    public int updateGoodsCount(Goods goods) {
        return updateDao.updateGoodsCount(goods);
    }

    public int updateGoodsCount1(Goods goods) {
        return updateDao.updateGoodsCount1(goods);
    }

    public Member getMemberById(int id) {
        return updateDao.getMemberById(id);
    }

    public int updateMember(Member member) {
        return updateDao.updateMember(member);
    }
}
